package com.api.syh56.shengyunhui.service;

import com.api.syh56.shengyunhui.common.CommonResult;
import com.api.syh56.shengyunhui.entity.User;
import com.api.syh56.shengyunhui.entity.Waybill;
import com.api.syh56.shengyunhui.entity.vo.LoginVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Map;

public interface UserService extends IService<User> {
    void reg(User user);

    User sendsms(User user);

    CommonResult<LoginVO> login(User user);

    User selectById(Long id);

    User selectByUserName(String userName);

    void authentication(User userdto);

    void selectRole(Short role);

    /**
     * 用户成交量增加
     */
    void addDelivery(Waybill waybill);



    /**
     * 用户余额增加
     */
    BigDecimal addBalance(Long id, BigDecimal income);

    /**
     * 用户余额减少
     */
    BigDecimal reduceBalance(Long id, BigDecimal income);

    /**
     * 根据订单增加邀请积分
     */
    void addInviteIntegral(Waybill waybill, BigDecimal integral);

    /**
     * 减少邀请积分
     */
    User reduceInviteIntegral(Long uid, BigDecimal integral);


    void clear(Long uid);

    HashSet<String> getClear(Long uid);

    void selectByP(int i);

    void getCouponNum();
}
